﻿using DoNet.ApiHttpClient.WechatApi;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;

namespace DoNet.Wechat.MP
{
    /// <summary>
    /// 微信公众平台请求基类
    /// </summary>
    public class WechatMpBase
    {
        /// <summary>
        /// 日志
        /// </summary>
        public ILogger logger;
        /// <summary>
        /// 微信公众平台请求服务
        /// </summary>
        public WechatApiService? wechatApiService;
        /// <summary>
        /// 微信公众平台请求
        /// </summary>
        /// <param name="_logger"></param>
        /// <param name="provider"></param>
        public WechatMpBase(ILogger _logger, IServiceProvider provider)
        {
            logger = _logger;
            wechatApiService = provider.GetService<WechatApiService>();
        }
    }
}
